pi, i = 0, 1
sign = 1
while 1 / i >= 1e-6:
    pi = pi + sign * 1 / i
    sign = - sign
    i = i + 2
print(pi * 4)